﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmBuscarCliente.aspx.cs" Inherits="Farmacia.net.Ventas.Cliente.frmBuscarCliente" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Buscar Cliente</h2>

<fieldset>
    <asp:Label ID="Label1" runat="server" Text="Ingrese Ruc o Dni:" 
        Font-Bold="True" ForeColor="Black"></asp:Label> 
    <asp:TextBox ID="txtBuscar" runat="server" Width="250px" ClientIDMode="Static" 
        Height="19px" />
    <asp:Button ID="btnBuscar" runat="server" Text="Buscar" ForeColor="Black" 
        ClientIDMode="Static" />
</fieldset>
    &nbsp;<asp:GridView ID="GridView1" runat="server" CellPadding="4" 
        AutoGenerateColumns="False" DataSourceID="odsCliente" Width="782px" 
        AllowPaging="True" Height="221px" ForeColor="#333333" GridLines="None">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="IdCliente" HeaderText="IdCliente" 
                SortExpression="IdCliente" >
            <ItemStyle Width="20px" />
            </asp:BoundField>
            <asp:BoundField DataField="RucDni" HeaderText="RucDni" 
                SortExpression="RucDni" >
            <ItemStyle Width="70px" />
            </asp:BoundField>
            <asp:BoundField DataField="RazonSocial" HeaderText="RazonSocial" 
                SortExpression="RazonSocial" >
            <ItemStyle Width="250px" />
            </asp:BoundField>
            <asp:BoundField DataField="Direccion" HeaderText="Direccion" 
                SortExpression="Direccion" >
            <ItemStyle Width="250px" />
            </asp:BoundField>
            <asp:HyperLinkField DataNavigateUrlFields="idCliente" 
                DataNavigateUrlFormatString="frmRegistrarCliente.aspx?acc=editar&amp;idCliente={0}" 
                HeaderText="Editar" Text="Editar" />
            <asp:HyperLinkField DataNavigateUrlFields="idCliente" 
                DataNavigateUrlFormatString="frmRegistrarCliente.aspx?acc=eliminar&amp;idCliente={0}" 
                HeaderText="Eliminar" Text="Eliminar" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:ObjectDataSource ID="odsCliente" runat="server" 
        SelectMethod="GetFromClienteByRazonSocialAndRucDni" 
        TypeName="Farmacia.BussinessLogic.ClienteBL" 
        onobjectcreating="odsCliente_ObjectCreating">
        <SelectParameters>
            <asp:ControlParameter ControlID="txtBuscar" DefaultValue="%" Name="criterio" 
                PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
